<br>
<table align="center" cellspacing="2" cellpadding="2" border="0">
<tr>
    <td colspan="2" align="center">
	<h1>Random effects with a skewed distribution</h1>
		<br><br>
	</td>
</tr>

<tr>
    <td width="30%">
	<table width="90%" border="0" cellspacing="0" cellpadding="2" bgcolor="#359163">
         <tr>
           <td align="center">
             <font face="Arial, Helvetica" color="White"><b>ADMB Files<br>
			 Normal random effects</b></font>
           </td>
         </tr>
         <tr>
           <td>
             <table cellspacing=0 cellpadding=3 width="100%" border=0 bgcolor="#ffffff">
               <tr>
			     <td>
                     Code: <a href="diet.tpl">diet.tpl</a><br>
                     Data: 		<a href="diet.dat">diet.dat</a><br>
                     Initial values: <a href="diet.pin">diet.pin</a><br>
                     Expected Results: <a href="diet.par">diet-expected-results.par</a><br>
				   </font>
                 </td>
               </tr>
             </table>
           </td>
         </tr>
       </table>


	<table width="90%" border="0" cellspacing="0" cellpadding="2" bgcolor="#359163">
         <tr>
           <td align="center">
             <font face="Arial, Helvetica" color="White"><b>Skewed random effects</b></font>
           </td>
         </tr>
         <tr>
           <td>
             <table cellspacing=0 cellpadding=3 width="100%" border=0 bgcolor="#ffffff">
               <tr>
			     <td>
                     Code: <a href="diet_sk.tpl">diet_sk.tpl</a><br>
                     Data: 		<a href="diet_sk.dat">diet_sk.dat</a><br>
                     Initial values: <a href="diet_sk.pin">diet_sk.pin</a><br>
					 Expected Results: <a href="diet_sk-expected-results.par">diet_sk.par</a><br>
				   </font>
                 </td>
               </tr>
             </table>
           </td>
         </tr>
       </table>
<br>

<!--
	<table width="90%" border="0" cellspacing="0" cellpadding="2" bgcolor="#359163">
         <tr>
           <td align="center">
             <font face="Arial, Helvetica" color="White"><b>Running ADMB-executables</b></font>
           </td>
         </tr>
         <tr>
           <td>
             <table cellspacing=0 cellpadding=3 width="100%" border=0 bgcolor="#ffffff">
               <tr>
			     <td>
                     In a <a href="../admb_tutorial.html">DOS</a> window<br> 
					 Under <a href="../admb_tutorial.html">linux</a><br>
				   </font>
                 </td>
               </tr>
             </table>
           </td>
         </tr>
       </table>
<br>


	   
	   <br>
	   
	      <TABLE cellSpacing=0 cellPadding=2 width="90%" bgColor=#359163 border=0>
        <TR>
          <TD align=middle><FONT face="Arial, Helvetica" 
            color=white><B>Navigation</B></FONT> </TD></TR>
        <TR>
          <TD>
            <TABLE cellSpacing=0 cellPadding=3 width="100%" bgColor=#ffffff 
            border=0>
              <TBODY>
              <TR>
                <TD>			  
				<A href="http://otter-rsch.com/admbre/admbre.html">ADMB-RE home</A> <br>
                <A href="http://otter-rsch.com/">Otter Research</A> 
        </FONT></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR>
      <TABLE cellSpacing=0 cellPadding=2 width="90%" bgColor=#359163 border=0></TABLE>
-->
	   
	</td>

	
 <td width="75%">
<h3><strong>Model description</strong></h3>

It is customary to assume that random effects are normally distributed.
Skrondal and Rabe-Hesketh (2004, Section 14.2) consider a measurement error problem, and 
compare the following two models:
<ol>
	<li>Random effects normally distributed</li>
	<li>Non-parametric model for the random effects</li>
</ol>
A description of the model and data is given <a href="skewed_re.ppt">here</a>. The non-parametric model 2)
indicates that the random effects distribution is skewed to the right. <br>
<br>
In this example we show: 1) how to implement the model with normal random effects in ADMB-RE (diet.tpl) and 2)
how to modify the the program to obtain skewed random effects (diet_sk.tpl). 
Only a small number of <a href="details.txt">changes</a> are needed to modify the ADMB-RE code to 
implement the skewed random effects.

<h3>Results</h3>
By looking at the result files (diet.par and diet_sk.par) we observe the following:
<ol>
	<li>The estimated parameters under the normal model match very closely the estimates in
		Table 14.1 of Skrondal and Rabe-Hesketh (2004).</li>
	<li>The log-likelihood value for the normal model is -1372.35, while the log-likelihood for the model with
	    skewed random effects is -1326.49. Hence, given that the skewed model only contains one extra parameter,
		it gives a much better fit to data.  </li>
</ol>

<h3>References</h3>
Skrondal and Rabe-Hesketh (2004), Generalized Latent Variable Modeling: Multilevel, 
Longitudinal and Structural Equation Models. Chapman & Hall

</table>

